package Bank;

public class BankTest {
    import java.util.Scanner;

    public class BankTest {
        public static void main(String[] args) {
            Bank bank;
            System.out.println("挂号排队中");
            System.out.println("办理业务");
            System.out.println("1.取款业务");
            System.out.println("2.理财业务");
            System.out.println("3.反馈业务");
            System.out.println("4.退出");
            System.out.println("选择您的操作：");
            Scanner scanner = new Scanner(System.in);

            while (true)
            {
                int num = scanner.nextInt();
                if(num == 1){
                    bank =new withdrawMoney();
                    bank.work();
                    System.out.println("取钱业务办理完毕");
                    System.out.println("请选择其他业务：");
                }
                else if(num == 2){
                    bank =new manageMoneyMatters();
                    bank.work();
                    System.out.println("理财业务办理完毕");
                    System.out.println("请选择其他业务：");
                }
                else if(num == 3){
                    bank =new FeedbackService();
                    bank.work();
                    System.out.println("反馈业务办理完毕");
                    System.out.println("请选择其他业务：");
                }
                else if(num == 4){
                    System.out.println("欢迎下次再来");
                    System.exit(0);
                }
                else{
                    System.out.println("请重新选择操作：");
                }
            }



        }
    }
}
